package com.dh.blog.dao;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.dh.blog.vo.UserVo;

@Repository
public interface UserDao {
	/**
	 * 增加用户
	 * @param user
	 */
	public void addOne(UserVo user);
	/**
	 * 根据loginName获得User
	 * @param loginname
	 * @return 
	 */
	public UserVo getUserByLoginName(String loginname);
	/**
	 * 根据loginName和密码获得User
	 * @param loginname
	 * @param password
	 * @return
	 */
	public UserVo getUserByNameAndPwd(
			@Param("loginname")String loginname,@Param("password")String password);
	/**
	 * 根据Id获得User
	 * @param userId
	 * @return
	 */
	public UserVo getUserById(String userId);
	/**
	 * 更新用户信息
	 * @param user
	 * @return
	 */
	public int updateOne(UserVo user);
}
